<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Light Theme</title>
<link href="/public/css/simpleGridTemplate.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="yangqq.com/skin/jxhx/css/base.css">
<link rel="stylesheet" href="https://www.yangqq.com/e/extend/lgyPl/assets/style.css">
<link href="/public/css/bootstrap-4.2.1.css" rel="stylesheet">
<script src="/public/js/jquery-1.11.3.min.js"></script>
</head>
<body>
  <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
    <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav mr-auto">
        <li class="nav-item active">
          <a class="nav-link" href="/">主页 <span class="sr-only">(current)</span></a>
        </li>
        <li class="nav-item">
          <a class="nav-link" href="#">自由论坛</a>
        </li>
        <li class="nav-item dropdown">
          <a class="nav-link" href="/ciku">
          诗词库
          </a>
        </li>
        <li class="nav-item">
          <a class="nav-link" href="/youxi">游戏</a>
        </li>
      </ul>
      <form class="form-inline my-2 my-lg-0">
        <input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">
        <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
      </form>
    </div>
  </nav>
<!-- Main Container -->
<div class="container" style="margin-top: 30px;"> 
  <!-- Header -->
  <header class="header">
    <h4 class="logo">名师公开课</h4>
  </header>
  <!-- Hero Section -->
  <section class="intro">
    <div class="column">
      <h3>讲师</h3>
      <img src="/public/0.png" alt="" class="profile"> </div>
    <div class="column">
      <p> 康震（1970年3月-），出生于榆林市绥德县，毕业于陕西师范大学，文学博士。现为北京师范大学文学院教授、博士生导师，中国李白研究会常务理事、中国王维研究会理事、唐代文学学会会员。</p>
      <p>今日公开课带尼领略李白杜甫的大唐气象</p>
    </div>
  </section>
  <!-- Stats Gallery Section -->
<div class="gallery">
   <div class="whitebg gbook">
         <h2 class="htitle" style="font-size: 18px;margin: 30px 0;">课程评论</h2>
         <ul>
   <!-- 评论 开始 -->
   <div class="pinglun">
   <div class="pl-520am" data-id="1132" data-classid="11" data-showhot="0">
         <div class="pl-area-post">
           <div class="pl-post">
             <div class="pl-textarea"><textarea class="pl-post-word" id="pl-520am-f-saytext" placeholder="写下你想说的，开始我们的对话"></textarea>
             </div>
             <div class="pl-tools">
                <ul>
                   <li class="pl-tools-lastchild"><button class="pl-submit-btn" id="pl-submit-btn-main" onclick="fabu()">发 布</button></li>
                  
                </ul>
             </div>
           </div>
         </div>

       <div class="pl-clr"></div>
       <div class="pl-showinfo">请先说点什么</div>
       <div class="pl-clr"></div>
       <div class="pl-show-hot-list">
         <div class="pl-title">热门评论</div>
         <div class="pl-show-list" id="pl-show-hot"></div>
       </div>
       <div class="pl-clr" id="pl-start"></div>
       <div class="pl-header"></div>
       <div class="pl-show-list" id="pl-show-all">
          <% for(let i=0,l=result.length;i<l;i++){%>
         <div class="pl-area pl-show-box" id="pl-show-box-2428">
           <div class="pl-area-userpic">
             <img id="pl-userpic" src="https://www.yangqq.com/e/extend/lgyPl/assets/userpic/user_03.jpg">
           </div>
           <div class="pl-area-post">
               <div class="pl-show-title"><span><%= result[i].username%></span> <span class="pl-show-time pl-fr"><%= result[i].time%></span></div>
               <div class="pl-show-saytext"><%= result[i].content%></div>
               <div class="pl-show-tools"><a id="pl-err-info-2428"></a> <a href="javascript:;" onclick="lgyPl.doForPl(2428,1,this)"><i class="iconfont icon-good"></i><span id="pl-1-2428"></span></a> <!-- <a href="javascript:;" onclick="lgyPl.doForPl(2428,0,this)"><i class="pl-icon icon-bad"></i><span id="pl-0-2428"></span></a> --> <a class="pl-reply" onclick="lgyPl.showReply(2428,'3')" href="javascript:;"><i class="iconfont"></i></a></div>
               <div class="pl-show-replay"></div>
           </div>
           <div class="pl-clr"></div>
         </div>
          <% }%>
   </div>
   </div>
   <!-- 评论 结束 -->
         </ul>
       </div>

</div>
<!-- Main Container Ends -->
<script>
  function fabu(){
    if($('#pl-520am-f-saytext').val()===''){
      alert('内容不能为空！')
      return
    }
    $.post('/fabu',{content:$('#pl-520am-f-saytext').val()},function(data){
      if(data.code===0){
        alert(data.msg)
        window.location.reload()
      }else{
        alert(data.msg)
        window.location.href="/login"
      }
    })
  }
</script>
</body>
</html>
